package com.hnkywl.sts.entity.jggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.organ.Ck;
import com.hnkywl.sts.entity.sys.Gg;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created by Melody on 14-3-11.
 */
@Entity
@Table(name = "T_BIZ_YQCCMX")
@Where(clause = "deleted!='1'")
public class Yqccmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqYqccmx", allocationSize = 1, sequenceName = "SEQ_BIZ_YQCCMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqYqccmx")
    private Long id;

    /**
     * 具体物资
     */
    @ManyToOne
    @JoinColumn(name = "JTWZ_ID")
    private Gg jtwz;

    /**
     * 仓库
     */
    @ManyToOne
    @JoinColumn(name = "CK_ID")
    private Ck ck;

    /**
     * 产地
     */
    @ManyToOne
    @JoinColumn(name = "SJZDZ_CD_ID")
    private Sjzdz cd;

    /**
     * 件重
     */
    private Double jz;

    /**
     * 成材数量
     */
    private Double ccsl = 0d;

    /**
     * 成材重量
     */
    private Double cczl = 0d;

    /**
     * 加工单
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JGD_ID")
    private Jgd jgd;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Gg getJtwz() {
        return jtwz;
    }

    public void setJtwz(Gg jtwz) {
        this.jtwz = jtwz;
    }

    public Jgd getJgd() {
        return jgd;
    }

    public void setJgd(Jgd jgd) {
        this.jgd = jgd;
    }

    public Double getCcsl() {
        return ccsl;
    }

    public void setCcsl(Double ccsl) {
        this.ccsl = ccsl;
    }

    public Double getCczl() {
        return cczl;
    }

    public void setCczl(Double cczl) {
        this.cczl = cczl;
    }

    public Ck getCk() {
        return ck;
    }

    public void setCk(Ck ck) {
        this.ck = ck;
    }

    public Sjzdz getCd() {
        return cd;
    }

    public void setCd(Sjzdz cd) {
        this.cd = cd;
    }

    public Double getJz() {
        return jz;
    }

    public void setJz(Double jz) {
        this.jz = jz;
    }

}
